#ifndef _GAME_PLAY_H_
#define _GAME_PLAY_H_
extern int matrix[24][28];
extern int interval_value ;

extern int dynamic_x;
extern int dynamic_y;
extern int dynamic_type;
extern int dynamic_change_type;
extern int dynamic_color;

extern int next_type;
extern int next_change_type;
extern int next_x;
extern int next_y;
extern int next_color;
//核心控制
void key_contrl();
int getch();

//简单控制
void move_left(int type, int change_type, int color);
void move_right(int type, int change_type, int color);
void change(int type, int color);
void full_down(int dynamic_type, int dynamic_change_type, int glabal_color);

//下落控制
int move_down(int type, int change_type, int color);
int check_line_blank(int line);
void clear_full_lines();
int check_shape(int type, int change_type, int x, int y);

int check_game_over();
void game_over();
void store_current_shape(int type, int change_type, int color);

//自由下落
void alarm_us(int init_interval);
void signal_handler(int signum);
#endif